<template>
    <div class="Container">
        
        <div class="glassBox">
            <div class="card">
                <div class="photo"><img src="../assets/img/personal.png" alt=""></div>
                <h1>个人中心</h1>
            </div>

            <div class="card">
                <div class="photo"><img src="../assets/img/img.jpg" alt=""></div>
                <h1>账户管理</h1>
            </div>

            <div class="card">
                <div class="photo"><img src="../assets/img/img.jpg" alt=""></div>
                <h1>签约用户</h1>
            </div>

            <div class="card">
                <div class="photo"><img src="../assets/img/img.jpg" alt=""></div>
                <h1>就诊预约</h1>
            </div>
        
            <div class="card">
                <div class="photo"><img src="../assets/img/img.jpg" alt=""></div>
                <h1>随访管理</h1>
            </div>

            <div class="card">
                <div class="photo"><img src="../assets/img/img.jpg" alt=""></div>
                <h1>签约申请</h1>
            </div>

            <div class="card">
                <div class="photo"><img src="../assets/img/img.jpg" alt=""></div>
                <h1>健康咨询</h1>
            </div>

            <div class="card">
                <div class="photo"><img src="../assets/img/dog-img.gif" alt=""></div>
                <h1>视频问诊</h1>
            </div>
        </div>
    </div>
</template>

<script>

</script>

<style>
.Container {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    width: auto;
    height:inherit;
    padding: 15px 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    /* 渐变背景 */
    /* background: linear-gradient(200deg,#29323c,#485563); */
    background: linear-gradient(125deg,#97afc6,#5d9c77,#2980b9,#b57d77,#a265bc);
    /* 指定背景图像的大小 */
    background-size: 200%;
    /* 执行动画：动画名 时长 线性的 无限次播放 */
    /* animation: bgAnimation 0.2s linear infinite;   */
}

@keyframes bgAnimation {
    0%{
        background-position: 0% 50%;
    }
    50%{
        background-position: 100% 50%;
    }
    100%{
        background-position: 0% 50%;
    }
}

.glassBox{
    display: flex;
    justify-content: center;
    align-items: center;
    border:1px solid rgb(57, 154, 206);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0,0,0,0.5); 
    backdrop-filter: grayscale(1);
}

.card{
    /* 相对定位 */
    position: relative;
    width: 100px;
    height: 112.5px;
    margin: 10px;
    background-color: #89c0e7;
    border-radius: 10px;
    /* 溢出隐藏 */
    overflow: hidden;
    /* 弹性布局 */
    display: flex;
    /* 元素纵向排列 */
    flex-direction: column;
    /* 居中 */
    align-items: center;
    color: #fff;
    /* 阴影 */
    /* box-shadow: 0 0 10px rgba(0,0,0,0.5); */
    /* 不让其被挤压 */
    flex-shrink: 0;
}
.card .photo img{
    width: 100%;
    height: 100%;
    /* 保持原有尺寸比例，裁切长边 */
    object-fit: cover;
}
/* 默认大图 */
.card .photo{
    /* 绝对定位 */
    position: absolute;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 0%;
    overflow: hidden;
    /* 动画过渡 */
    transition: 0.5s;
}
/* 鼠标移入变小图 */
.card:hover .photo{
    top: 15px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(0,0,0,0.8);
}
/* 这里加个黑色到透明的渐变背景，可以更好的看清楚名字 */
.card .photo::before{
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom,transparent 50%,#222);
}
.card h1{
    position: absolute;
    top: 185px;
    transition: 0.5s;
}
.card:hover h1{
    top: 85px;
}

</style>